package com.mi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mi.system.entity.RoleMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Role menu mapper
 *
 * @author jin_huaquan
 * @version 1.0
 * @date 2021/11/1 13:49
 */
@Mapper
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {

    /**
     * 查询角色关联的菜单ID集合
     *
     * @param roleId 角色ID
     * @return 菜单ID集合
     */
    List<Long> selectMenuIdByRoleId(@Param("roleId") Long roleId);

    /**
     * select menu permission by role ids
     *
     * @param roleIds role ids
     * @return permission list
     */
    List<String> selectPermissionByRoleIds(@Param("roleIds") Long[] roleIds);
}
